package com.tencent.mm.opensdk.a.a;

import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.util.Log;

import com.tencent.mm.opensdk.b.d;

public final class a {
    public static final class a$a {
        public String c;
        public Bundle d;
        public String e;
        public String f;
        public long g;

        public a$a() {

        }
    }

    public static boolean a(Context arg7, a$a arg8) {
        int v6 = 603979778;
        boolean v0 = false;
        if(arg7 == null) {
            Log.e("MicroMsg.SDK.MMessage", "send fail, invalid argument");
        }
        else if(d.a(arg8.f)) {
            Log.e("MicroMsg.SDK.MMessage", "send fail, action is null");
        }
        else {
            String v0_1 = null;
            if(!d.a(arg8.e)) {
                v0_1 = arg8.e + ".permission.MM_MESSAGE";
            }

            Intent v1 = new Intent(arg8.f);
            if(arg8.d != null) {
                v1.putExtras(arg8.d);
            }

            String v2 = arg7.getPackageName();
            v1.putExtra("_mmessage_sdkVersion", v6);
            v1.putExtra("_mmessage_appPackage", v2);
            v1.putExtra("_mmessage_content", arg8.c);
            v1.putExtra("_mmessage_support_content_type", arg8.g);
            v1.putExtra("_mmessage_checksum", b.a(arg8.c, v6, v2));
            arg7.sendBroadcast(v1, v0_1);
            Log.d("MicroMsg.SDK.MMessage", "send mm message, intent=" + v1 + ", perm=" + v0_1);
            v0 = true;
        }

        return v0;
    }
}

